from PIL import Image
# 打开图片
img = Image.open('google_logo.png')
# print(type(img),img)

# 提取RGBA颜色通道
r,g,b,a = img.split()
print(r)
print(g)
print(b)
print(a)

# 合并通道
img_1 = Image.merge(mode='RGBA',bands=(r,b,g,a))
img_1.save('new_google.png')